home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / wirenet / files / thor26_main.lha / THOR_2.6 / InstallThor < prev    next >
Text File  |  1999-02-28  |  56KB  |  1,933 lines

  1. ; $Id: InstallThor 1.7 1997/09/16 12:22:02 pettern Exp $
  2. ;*************************************************************************
  3. ;    Title:
  4. ;        InstallThor
  5. ;*************************************************************************
  6. ;    Description:
  7. ;        Commodore Installer Script for the Thor software
  8. ;*************************************************************************
  9. ;    Author:
  10. ;        Øyvind Ellefsen - versions for THOR upto 1.22
  11. ;       Petter Nilsen   - versions for 1.25 ->
  12. ;          - parts borrowed from the Demon ISP installer for THOR 2.3
  13. ;            created by Neil Bothwick <neil@wirenet.u-net.com>
  14. ;          - intro borrowed from Robert Reiswig's CyberGfx installer
  15. ;*************************************************************************
  16. ;    Still to do:
  17. ;        - Show .readme file
  18. ;        - Warn against MultiUser
  19. ;       - Make sure all dirs are present before copying files
  20. ;
  21. ;*************************************************************************
  22. ;
  23. ;******************************************************
  24. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  25. ;******************************************************
  26.  
  27. ; some useful variables
  28.     (set 
  29.         true             1
  30.         false             0
  31.         yes             true
  32.         no                 false
  33.         is_a_file         1
  34.         is_a_dir         2
  35.         quote             "\""
  36.         newline         "\n"
  37.         tick             "'"
  38.         nothing         ""
  39.         dldirproblem    0
  40.         bbspack         0
  41.         inetpack         0
  42.         #inetpackname     "thor26_inet.lha"
  43.         #bbspackname     "thor26_bbs.lha"
  44.         #arexxpackname     "thor26_arexx.lha"
  45.         #docspackname     "thor26_docs.lha"
  46.         #version        "THOR 2.6"
  47.         tcptype         0
  48.         uucptype         0
  49.         cpu             (database "cpu")
  50.         cpu020             (and (<> cpu "68000") (<> cpu "68010"))
  51.         v39             (>= (/ (getversion "exec.library" (resident)) 65536) 39)
  52.  
  53.         #installtext    (cat "This section of the installation is dedicated "
  54.                             "to some first-time parameters that THOR "
  55.                             "needs to have configured.\n\n"
  56.                             "Select YES if you want to continue with this "
  57.                             "configuration, otherwise NO")
  58.  
  59.         #endtcpcfgtext    (cat "After this installation is complete, please read the introductory mail "
  60.                             "waiting for you in THOR.")
  61.  
  62.         #endtext        (cat "Hope you like THOR! Do not hesitate to "
  63.                             "send us comments, bugreports and suggestions.\n\n"
  64.                             "Check out http://www.thule.no/ for updates and news, "
  65.                             "and consider subscribing to one of the mailing lists for "
  66.                             "THOR that are operational. See the readme file included "
  67.                             "with this distribution for details."
  68.                         )
  69.  
  70.     )
  71.  
  72. ; some useful procedures
  73.     ; change userlevel to expert
  74.     (procedure expert_level
  75.         (
  76.             (user 2)
  77.         )
  78.     )
  79.  
  80. ; reset userlevel back to default
  81.     (procedure default_level
  82.         (
  83.             (user default-level)
  84.         )
  85.     )
  86.  
  87. ; store off userlevel
  88.     (procedure save_default_level
  89.         (
  90.             (set default-level @user-level)
  91.         )
  92.     )
  93.  
  94. ; some overused strings
  95. (set #omp (cat "One moment please..." newline))
  96.  
  97. (set #classact "\n\n\nThe following is the default Install/Update Installer\n\nProcedure for placing ClassAct on your System.")
  98.  
  99. ;********************************************************************
  100. ; ClassAct Install/Update Default Procedure by:
  101. ; Osma Ahvenlampi - Osma.Ahvenlampi@hut.fi
  102. ;********************************************************************
  103. ; I have disabled the (complete) settings
  104. (working #classact)
  105. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  106. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  107. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  108. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  109.  
  110. ; $VER: ClassAct_Install 1.10 (21.1.97) by Osma Ahvenlampi
  111.  
  112. (set cpu (database "cpu"))
  113. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  114. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  115.  
  116. ; percentage of the size of included ClassAct classes versus the whole
  117. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  118. (set classact-complete 50)
  119.  
  120. ; ClassAct installer scripts
  121. (if (= @language "español")
  122. ; SPANISH CLASSACT INSTALLATION STRINGS
  123. (
  124. (set #classdest-prompt "Por favor, seleccione el directorio donde desea instalar las clases de ClassAct.\n(Vea la ayuda para más detalles)")
  125. (set #classdest-help (cat "ClassAct es un kit de interface gráfica consistente es clases compartidas BOOPSI.\n\nAlgunos programas requieren que algunas o todas de las clases de ClassAct estén instaladas en su sistema. "
  126.     (if v39 (cat "El OS 3.0 tiene un directorio estándar para las clases BOOPSI: el directorio SYS:Classes. Se recomienda que instale ClassAct ahí.")
  127.             (cat "El OS 2.0 no tiene un sitio estándar para las clases BOOPSI residentes en disco. En el OS 3.0 esas clases son almacenadas en el directorio SYS:Classes. Se recomienda que cree este directorio e instale ClassAct ahí.\nEste directorio debe ser añadido a la asignación de LIBS:. Esto puede ser hecho colocando el comando\nAssign >NIL: LIBS: SYS:Classes ADD\nal User-Startup. Este instalador lo hará por usted.")
  128.         )
  129.     )
  130. )
  131. (set #classes-020 "¿Quiere usar la versión optimizada para OS 3.0 y 020 de ClassAct?")
  132. (set #help-020 "Algunas librerías de ClassAct tienen versiones optimizadas para el uso en máquinas con OS 3.0 y 020 o superior. Si su Amiga es una de tales máquinas debería instalar estas. Las versiones 68000/2.0 también funcionarán, pero son ligeramente más lentas")
  133. (set #noclasses-message "El subdirectorio que seleccionó para sus clases ClassAct no forma parte de la asignación de LIBS:.\n\nEs necesario añadir esta asignación para que las clases puedan ser localizadas adecuadamente.")
  134. (set #creating-dir "Creando directorio ")
  135. (set #usbackup-prompt "Ahora se hará una copia de seguridad del User-Startup.")
  136. (set #usbackup-help "Este instalador hará ahora una modificación en el User-Startup. Antes de hacer esto se hará una copia de seguridad del User-Startup en S:User-Startup.old")
  137. (set #adding-1 "Añadiendo ")
  138. (set #adding-2 "a la asignación de LIBS:\n")
  139. (set #adding-help "Esto es necesario para que las clases puedan ser encontradas.")
  140. (set #junod-button "Parece que tiene el último button.gadget de Comodore ('V42') instalado en su sistema.\n\nEl button.gadget de ClassAct es superior a este gadget y le recomendamos que lo remplace. El button.gadget de ClassAct es compatible con el de Commodore. ¿Desea hacer una copia de seguridad del gadget de Commodore y remplazarlo por la versión de ClassAct?")
  141. (set #junod-backed "Se ha hecho una copia de seguridad del button.gadget 'V42' de Commodore con el nombre button.gadget.v42.\n\nEl button.gadget de ClassAct será instalado en su lugar.")
  142. (set #junod-kept "El button.gadget 'V42' de Commodore no fué remplazado con la versión superior de ClassAct.\n\nLos programas que dependan de la disponibilidad de las características de la versión de ClassAct funcionarán mal probablemente")
  143. ;(set #caprefs-message "CAPrefs es una pequeña utilidad que inicializa algunas preferencias del usuario para las aplicaciones ClassAct. Estas incluyen el estilo de resaltado (Fino/GadTools/Xen), relleno de ventanas, y detalles de las etiquetas de grupo.\n\nPor favor, use las preferencias de interface de ClassAct en su cajón de sistema 'Prefs' .\n\n")
  144. (set #caprefs-message "ClasAct tiene varios aspectos configurables por el usuario que afectan a la apariencia de las interfaces ClassAct.\n\nEstos ajustes pueden ser modificados usando la herramienta de preferencias de ClassAct que será instalada en su cajón 'Prefs'.\n\nUna pequeña herramienta, CAPrefs, será añadida a su user-startup para cargar los ajustes al arrancar.")
  145. (set #caprefs-startup-1 "Añadiendo el comando\n\n")
  146. (set #caprefs-startup-2 "\n\nA su s:User-Startup.")
  147. (set #decompressing-classact "Distribución de Classact comprimida detectada\n\nDescomprimiendo a RAM:")
  148. (set #deleteing-cltmp "Borrando ficheros temporales")
  149. )
  150. ; ENGLISH CLASSACT INSTALLATION STRINGS
  151. (
  152. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  153. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  154.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  155.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  156.         )
  157.     )
  158. )
  159. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  160. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  161. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  162. (set #creating-dir "Creating directory ")
  163. (set #usbackup-prompt "User-Startup will now be backed up.")
  164. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  165. (set #adding-1 "Adding ")
  166. (set #adding-2 " to LIBS: assign\n")
  167. (set #adding-help "This is necessary so that the custom classes can be found.")
  168. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  169. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  170. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  171. ;(set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  172. (set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.")
  173. (set #caprefs-startup-1 "Adding the command\n\n")
  174. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  175. (set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to RAM:")
  176. (set #deleting-cltmp "Deleting temporary files")
  177. )
  178. )
  179.  
  180. (procedure install-classact
  181. ; call this procedure to copy the classes included in the Classes directory
  182. ; in your distribution dir.
  183.     (if (exists "ClassAct.lha")    ; ClassAct is compressed - need to decompress first
  184.         (                        ; Distribution includes LHEX
  185.             (working (cat #decompressing-classact))
  186. ; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct"
  187.             (run "lhex -aqfw=ram:ClassAct/ x ClassAct.lha")
  188.             (set @classact-source "RAM:ClassAct")
  189.         )
  190.         (set @classact-source (pathonly @icon))
  191.     )
  192.     (if (exists "ClassAct.lzx")    ; ClassAct is compressed - need to decompress first
  193.         (                        ; Distribution includes UNLZX
  194.             (working (cat #decompressing-classact))
  195. ; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign",  "Prefs/CAPrefs" and "Prefs/ClassAct"
  196.             (run "unlzx -amq x ClassAct.lzx ram:ClassAct/")
  197.             (set @classact-source "RAM:ClassAct")
  198.         )
  199.         (set @classact-source (pathonly @icon))
  200.     )
  201.  
  202.     (if (exists (tackon @classact-source "Classes")) ; The archive contains a ClassAct library update.
  203.     (
  204.         (set comp-dest  (/ (* classact-complete 2) 10))
  205.         (set comp-libs  (/ (* classact-complete 3) 10))
  206.         (set comp-dirs  (/ (* classact-complete 4) 10))
  207.         (set comp-junod (/ (* classact-complete 5) 10))
  208.         (set comp-020   (/ (* classact-complete 6) 10))
  209.         (set comp-gad   (/ (* classact-complete 7) 10))
  210.         (set comp-im    (/ (* classact-complete 8) 10))
  211.         (set comp-prefs (/ (* classact-complete 9) 10))
  212.     
  213.         ; has the user installed ClassAct in CLASSACT: ?
  214.         (set @classact-dest (getassign "CLASSACT" "A"))
  215.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  216.         
  217.         ; is ClassAct already in SYS:Classes ?
  218.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  219.                 (= @user-level 2))
  220.             ; no, ask where it should be placed
  221.             (set @classact-dest
  222.                 (askdir
  223.                     (prompt #classdest-prompt)
  224.                     (help #classdest-help)
  225.                     (default @classact-dest)
  226.                     (newpath)
  227.                 )
  228.             )
  229.         )
  230.         
  231.         (complete comp-dest)
  232.         
  233.         (if (<> (run (cat (tackon @classact-source "C/CheckAssign") " LIBS: " @classact-dest)) 0)
  234.             (
  235.                 (message #noclasses-message)
  236.                 (if (not (exists @classact-dest))
  237.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  238.                 )
  239.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  240.                 (startup "CLASSACT"
  241.                     (command @addassign)
  242.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  243.                     (help #adding-help)
  244.                 )
  245.                 (run (@addassign))
  246.             )
  247.         )
  248.         
  249.         (complete comp-libs)
  250.         
  251.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  252.         (set @classact-images (tackon @classact-dest "Images"))
  253.         
  254.         (if (not (exists @classact-gadgets (noreq)))
  255.             (makedir @classact-images
  256.                 (prompt (cat #creating-dir @classact-gadgets))
  257.             )
  258.         )
  259.         
  260.         (if (not (exists @classact-images (noreq)))
  261.             (makedir @classact-images
  262.                 (prompt (cat #creating-dir @classact-images))
  263.             )
  264.         )
  265.         
  266.         (complete comp-dirs)
  267.         
  268.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  269.             (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget"))
  270.                     (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget")))
  271.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  272.                     (
  273.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  274.                         (message #junod-backed)
  275.                     )
  276.                     (message #junod-kept)
  277.                 )
  278.             )
  279.         )
  280.         
  281.         (complete comp-junod)
  282.         
  283.         (if (and (and cpu020 v39) (exists (tackon @classact-source "Classes/Gadgets/layout.gadget.020")))
  284.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1)))
  285.             (set classes-020 0)
  286.         )
  287.  
  288.         (complete comp-020)
  289.         
  290.         (set @source-path (tackon @classact-source "Classes/Gadgets"))
  291.         (foreach @source-path "#?.gadget"
  292.             (
  293.                 (set thislib (tackon @source-path @each-name))
  294.                 (if (and classes-020 (exists (cat thislib ".020")))
  295.                     (set thislib (cat thislib ".020"))
  296.                 )
  297.                 (copylib (source thislib)
  298.                     (dest @classact-gadgets)
  299.                     (newname @each-name)
  300.                     (prompt (cat #installing @each-name))
  301.                     (help #classdest-help)
  302.                     (optional "force" "askuser")
  303.                 )
  304.             )
  305.         )
  306.         
  307.         (complete comp-gad)
  308.         
  309.         (set @source-path (tackon @classact-source "Classes/Images"))
  310.         (foreach @source-path "#?.image"
  311.             (
  312.                 (set thislib (tackon @source-path @each-name))
  313.                 (if (and classes-020 (exists (cat thislib ".020")))
  314.                     (set thislib (cat thislib ".020"))
  315.                 )
  316.                 (copylib (source thislib)
  317.                     (dest @classact-images)
  318.                     (newname @each-name)
  319.                     (prompt (cat #installing @each-name))
  320.                     (help #classdest-help)
  321.                     (optional "force" "askuser")
  322.                 )
  323.             )
  324.         )
  325.         
  326.         (complete comp-im)
  327.  
  328.         (set @source-path (tackon @classact-source "Classes"))
  329.         (foreach @source-path "#?.class"
  330.             (
  331.                 (set thislib (tackon @source-path @each-name))
  332.                 (if (and classes-020 (exists (cat thislib ".020")))
  333.                     (set thislib (cat thislib ".020"))
  334.                 )
  335.                 (copylib (source thislib)
  336.                     (dest @classact-dest)
  337.                     (newname @each-name)
  338.                     (prompt (cat #installing @each-name))
  339.                     (help #classdest-help)
  340.                     (optional "force" "askuser")
  341.                 )
  342.             )
  343.         )
  344.     )
  345.     )
  346.     (if (exists (tackon @classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools
  347.     (
  348.         (message #caprefs-message)
  349.         
  350.         (copylib (source (tackon @classact-source "Prefs/CAPrefs")) 
  351.             (dest "C:") 
  352.             (prompt (cat #installing "CAPrefs"))
  353.         )
  354.         (copylib (source (tackon @classact-source "Prefs/ClassAct"))
  355.             (dest "SYS:Prefs")
  356.             (prompt (cat #installing "ClassAct Prefs"))
  357.             (infos)
  358.         )
  359.         
  360.         (complete comp-prefs)
  361.         
  362.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  363.             (
  364.                 (makedir "ENVARC:ClassAct"
  365.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  366.                 )
  367.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  368.                     (append "")
  369.                 )
  370.             )
  371.         )
  372.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  373.  
  374.         (startup "CAPREFS"
  375.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  376.             (help #caprefs-message)
  377.             (command caprefs-cmd)
  378.         )
  379.     )
  380.     )
  381.     
  382.     (if (or (exists "ClassAct.lha") (exists "ClassAct.lzx"))
  383.         (run "C:Delete RAM:ClassAct ALL"
  384.             (prompt #deleting-cltmp)
  385.         )
  386.     )
  387.  
  388.     (complete classact-complete)
  389. )
  390.  
  391. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  392. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  393.  
  394. ; ---------------------------------------------------------------------------
  395. (procedure set_dl_dir
  396.     (set DL_Dir (expandpath DL_Dir))
  397.     
  398.     ; verify that the download directory exists
  399.     (if (<> (exists DL_Dir) is_a_dir)
  400.         (
  401.             (makedir DL_Dir
  402.                 (prompt
  403.                     "The directory you have selected for download "
  404.                     "directory does not seem to exist.\n\n"
  405.                     "Do you want it to be created for you?")
  406.                 (help @makedir-help)
  407.                 (infos)
  408.                 (confirm)
  409.             )
  410.         )
  411.     )
  412.     (if (<> DL_Dir "")
  413.         (if (= (exists DL_Dir) is_a_dir)
  414.             (
  415.                 (set dlstr (cat dlstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br DNL " quote DL_Dir quote))
  416.                 (run dlstr)
  417.                 (run dlstr)
  418.             )
  419.         )
  420.     )
  421.     (if (patmatch '#? #?' DL_Dir)
  422.         (set dldirproblem 1)
  423.     )
  424. )
  425.  
  426. (procedure set_ul_dir
  427.     (set UL_Dir (expandpath UL_Dir))
  428.     
  429.     ; verify that the upload directory exists
  430.     (if (<> (exists UL_Dir) is_a_dir)
  431.         (
  432.             (makedir UL_Dir
  433.                 (prompt
  434.                     "The directory you have selected for upload of "
  435.                     "reply packets does not seem to exist.\n\n"
  436.                     "Do you want it to be created for you?")
  437.                 (help @makedir-help)
  438.                 (infos)
  439.                 (confirm)
  440.             )
  441.         )
  442.     )
  443.     (if (<> UL_Dir "")
  444.         (if (= (exists UL_Dir) is_a_dir)
  445.             (
  446.                 (set ulstr (cat ulstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br UPL " quote UL_Dir quote))
  447.                 (run ulstr)
  448.             )
  449.         )
  450.     )
  451. )
  452.  
  453. (procedure P_parsemail #system
  454.     (working 'Adding tutorial mail....')
  455.     (run (cat "Thor:bin/ParseUUCP " quote #system quote " GRAB Thor_Install:MIMEmail DELETE"))
  456. )
  457.  
  458. (procedure create_inet_system
  459.     (set systemname
  460.         (askstring
  461.             (prompt 
  462.                     "Please enter the name of the Internet system. "
  463.                     "This is the name used internally in THOR. ")
  464.             (help "This information is needed to configure a new system "
  465.                     "for use in THOR. ")
  466.             (default "Internet")
  467.         )
  468.     )
  469.     (set UserName
  470.         (if (exists 'ENV:USERNAME' (noreq))
  471.             (getenv 'USERNAME')
  472.             (if (exists 'ENV:USER' (noreq))
  473.                 (getenv 'USER')
  474.                 'username'
  475.             )
  476.         )
  477.     )
  478.     (set UserName
  479.         (askstring
  480.             (prompt "If you get mail using SMTPd or a similar program, "
  481.                     "please enter your user name now (which is also "
  482.                     "the name of the mailfile). If you want to use "
  483.                     "THOR's POP client for collecting mail, you can "
  484.                     "leave this blank.")
  485.             (help "This information is only needed if you get mail "
  486.                     "by some other means than the method THOR supports "
  487.                     "(eg. using SMTPd).")
  488.             (default UserName)
  489.         )
  490.     )
  491.     (if (= UserName "")
  492.         ( ; Then
  493.             (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " TYPE TCP"))
  494.         )
  495.         ( ; Else
  496.             (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " GRAB " quote UserName quote " TYPE TCP"))
  497.         )
  498.     )
  499.     (run sysstr)
  500.     (P_parsemail systemname)
  501. )
  502.  
  503. (procedure P_executescript #script
  504.     (set failed (execute #script))
  505.     (while (<> 0 failed)
  506.         (
  507.             (set fail_text (cat "Failed to execute the script "#script".\nWill try again."))
  508.             (message fail_text)
  509.             (set failed (execute #script))
  510.         )
  511.     )
  512. )
  513.  
  514. ;**************************************
  515. ;****** Install filetype icons ********
  516. ;**************************************
  517.  
  518. (procedure P_install-filetypes
  519.     (makedir "Thor:Filetypes" (infos))
  520.  
  521.     (set icon
  522.         (askchoice
  523.             (prompt
  524.                 "Please select what icon set THOR will use internally on MIME attachments.\n"
  525.                 "(we recommand that you select normal icons unless you run more than 8 colours "
  526.                 "on the THOR screen).")
  527.             (help
  528.                 "If you use MagicWB on your Workbench, "
  529.                 "you might want to install the special MagicWB icons.\n\n"
  530.                 "Likewise, if you use NewIcons on your Workbench, "
  531.                 "you might want to install the special NewIcons icons.")
  532.             (choices "Normal icons" "Small MagicWB icons" "MagicWB icons" "NewIcons icons")
  533.             (default 0)
  534.         )
  535.     )
  536.     (if (= icon 0)
  537.         (
  538.             (copyfiles
  539.                 (prompt "Copying Normal filetype icons...")
  540.                 (source "Thor_Install:FiletypesNORMAL")
  541.                 (dest "Thor:filetypes")
  542.                 (pattern "#?")
  543.                 (noposition)
  544.                 (nogauge)
  545.             )
  546.         )
  547.     )
  548.     (if (= icon 1)
  549.         (
  550.             (copyfiles
  551.                 (prompt "Copying small MagicWB filetype icons...")
  552.                 (source "Thor_Install:FiletypesMWBsmall")
  553.                 (dest "Thor:filetypes")
  554.                 (pattern "#?")
  555.                 (noposition)
  556.                 (nogauge)
  557.             )
  558.         )
  559.     )
  560.     (if (= icon 2)
  561.         (
  562.             (copyfiles
  563.                 (prompt "Copying MagicWB filetype icons...")
  564.                 (source "Thor_Install:Filetypes")
  565.                 (dest "Thor:filetypes")
  566.                 (pattern "#?")
  567.                 (noposition)
  568.                 (nogauge)
  569.             )
  570.         )
  571.     )
  572.     (if (= icon 3)
  573.         (
  574.             (copyfiles
  575.                 (prompt "Copying NewIcon filetype icons...")
  576.                 (source "Thor_Install:FiletypesNI")
  577.                 (dest "Thor:filetypes")
  578.                 (pattern "#?")
  579.                 (noposition)
  580.                 (nogauge)
  581.             )
  582.         )
  583.     )
  584.     ;*****************************
  585.     ;*** Set default viewers *****
  586.     ;*****************************
  587.  
  588.     (set picviewer
  589.         (askstring
  590.             (prompt
  591.                 "Please type the name (with full path, if needed) "
  592.                 "of the picture viewer you will use as external viewer of attached "
  593.                 "pictures in Thor. If left blank, Multiview will be used.")
  594.             (help "External picture viewer to be used in Thor.")
  595.             (default "")
  596.         )
  597.     )
  598.     (if (<> picviewer "")
  599.         ( ; Then
  600.             (tooltype 
  601.                 (dest "Thor:Filetypes/def_picture")
  602.                 (setdefaulttool picviewer)
  603.             )
  604.         )
  605.     )
  606.     (set animviewer
  607.         (askstring
  608.             (prompt
  609.                 "Please type the name (with full path, if needed) "
  610.                 "of the animation viewer you will use as external viewer of attached "
  611.                 "animations in Thor. If left blank, Multiview will be used.")
  612.             (help "External animation viewer to be used in Thor.")
  613.             (default "")
  614.         )
  615.     )
  616.     (if (<> animviewer "")
  617.         ( ; Then
  618.             (tooltype 
  619.                 (dest "Thor:Filetypes/def_anim")
  620.                 (setdefaulttool animviewer)
  621.             )
  622.         )
  623.     )
  624.     (set soundplayer
  625.         (askstring
  626.             (prompt
  627.                 "Please type the name (with full path, if needed) "
  628.                 "of the sound player you will use as external player of attached "
  629.                 "sounds in Thor. If left blank, Multiview will be used.")
  630.             (help "External sound player to be used in Thor.")
  631.             (default "")
  632.         )
  633.     )
  634.     (if (<> soundplayer "")
  635.         ( ; Then
  636.             (tooltype 
  637.                 (dest "Thor:Filetypes/def_sound")
  638.                 (setdefaulttool soundplayer)
  639.             )
  640.         )
  641.     )
  642.     (set textviewer
  643.         (askstring
  644.             (prompt
  645.                 "Please type the name (with full path, if needed) "
  646.                 "of the text viewer you will use as external viewer of attached "
  647.                 "text files in Thor. If left blank, Multiview will be used.")
  648.             (help "External text viewer to be used in Thor.")
  649.             (default "")
  650.         )
  651.     )
  652.     (if (<> textviewer "")
  653.         ( ; Then
  654.             (tooltype 
  655.                 (dest "Thor:Filetypes/def_text")
  656.                 (setdefaulttool textviewer)
  657.             )
  658.         )
  659.     )
  660.     (set docviewer
  661.         (askstring
  662.             (prompt
  663.                 "Please type the name (with full path, if needed) "
  664.                 "of the documentation (eg. AmigaGuide ) viewer you will use as external viewer of attached "
  665.                 "documentation files in Thor. If left blank, Multiview will be used.")
  666.             (help "External documentation viewer to be used in Thor.")
  667.             (default "")
  668.         )
  669.     )
  670.     (if (<> docviewer "")
  671.         ( ; Then
  672.             (tooltype 
  673.                 (dest "Thor:Filetypes/def_doc")
  674.                 (setdefaulttool docviewer)
  675.             )
  676.         )
  677.     )
  678. )
  679.  
  680. (procedure WAITX (set X 1) ( (while (< X 100)  (set X (+ X 1)) )  ) )
  681.  
  682. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  683. (working (cat "\n\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  684. (working (cat "\n\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  685. (working (cat "\n\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  686. (working (cat "\n\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  687. (working (cat "\n\n\n\n\n\n\n\n"#version"")) (WAITX)
  688. (working (cat "\n\n\n\n\n\n\n"#version"")) (WAITX)
  689. (working (cat "\n\n\n\n\n\n"#version"")) (WAITX)
  690. (working (cat "\n\n\n\n\n"#version"")) (WAITX)
  691. (working (cat "\n\n\n\n"#version"")) (WAITX)
  692. (working (cat "\n\n\n"#version"")) (WAITX)
  693. (working (cat "\n\n"#version"")) (WAITX)
  694. (working (cat "\n\n"#version"")) (WAITX)
  695. (working (cat "\n"#version"")) (WAITX)
  696. (working (cat "\n"#version"")) (WAITX)
  697.  
  698. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  699. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  700. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\n\nby")) (WAITX)
  701. (working (cat "\n"#version"\n\n\n\n\n\n\n\n\nby")) (WAITX)
  702. (working (cat "\n"#version"\n\n\n\n\n\n\n\nby")) (WAITX)
  703. (working (cat "\n"#version"\n\n\n\n\n\n\nby")) (WAITX)
  704. (working (cat "\n"#version"\n\n\n\n\n\nby")) (WAITX)
  705. (working (cat "\n"#version"\n\n\n\n\nby")) (WAITX)
  706. (working (cat "\n"#version"\n\n\n\nby")) (WAITX)
  707. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  708. (working (cat "\n"#version"\n\n\nby")) (WAITX)
  709.  
  710. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  711. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  712. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  713. (working (cat "\n"#version"\n\n\nby\n\n\n\n\n\nUltima Thule Software")) (WAITX) 
  714. (working (cat "\n"#version"\n\n\nby\n\n\n\n\nUltima Thule Software")) (WAITX) 
  715. (working (cat "\n"#version"\n\n\nby\n\n\n\nUltima Thule Software")) (WAITX) 
  716. (working (cat "\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  717.  
  718. (message (cat "\n\n\n"#version"\n\n\nby\n\n\nUltima Thule Software")) (WAITX) 
  719.  
  720. (welcome)
  721.  
  722. ; first reset the user level so that the novice can see what's going on
  723. (save_default_level)
  724. (expert_level)
  725.  
  726. ;Make assign to install from
  727. (makeassign "Thor_Install" "" (safe))
  728.  
  729.  
  730. ;******************
  731. ;** Check Memory **
  732. ;******************
  733.  
  734. (run "Avail flush")
  735.  
  736. (set Running (run "Thor_Install:CheckForLib"))
  737.  
  738. (while (= Running 20)
  739.       (
  740.         (Message newline "Thor seem to be running, you MUST close it NOW."    
  741.                 newline "If you don't, the installation will fail!")
  742.         (run "Avail flush")
  743.         (set Running (run "Thor_Install:CheckForLib"))
  744.     )
  745. )
  746.  
  747. ;************************
  748. ;** Start Installation **
  749. ;************************
  750.  
  751. (if (exists "envarc:THOR/BBSDataPath" (noreq))
  752.     (
  753.         (if    (askbool
  754.                    (prompt 
  755.                         "THOR seems to be already installed, "
  756.                         "do you want to install it again and "
  757.                         "dispose of your previous installation?")
  758.                 (help 
  759.                         "The installer script has found a previous "
  760.                         "installation of THOR.\n\n"
  761.                         "Select YES if you want it install again, otherwise NO")
  762.                 (default 1)
  763.             )
  764.             ; Then
  765.             (
  766.                 (delete "envarc:thor" (all))
  767.                 (delete "env:thor" (all))
  768.                 (run "delete env:thor all force")
  769.                 (run "delete envarc:thor all force")
  770.             )
  771.             ; Else
  772.             (
  773.                 (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  774.                 (abort end_text)
  775.             )
  776.         )
  777.     )
  778. )
  779.  
  780. (set Thor_Dir 
  781.     (askdir
  782.         (prompt "Where would you like Thor installed?"
  783.         newline "The installer will create a 'Thor' directory in it.")
  784.         (help @askdir-help)
  785.         (default "Work:")
  786.         (newpath)
  787.     )
  788. )
  789. (set Thor_Dir (tackon (expandpath Thor_Dir) "Thor"))
  790.  
  791. ; before we go on lets reset the user's level back to what it was
  792. (default_level)
  793.  
  794. ; create the dir
  795. (makedir Thor_Dir (infos))
  796.  
  797. ; Create directories for the THOR installation
  798.  
  799. (makeassign "Thor" Thor_dir)
  800. (makedir "Thor:Data")
  801. (makeassign "BBSData" "Thor:data")
  802.  
  803. ;***********************************
  804. ;***** GET FIRST DISK IN HERE ******
  805. ;***********************************
  806.  
  807. ; first copy over the stuff
  808. (working #omp "Decompressing and copying Thor files.")
  809.  
  810. (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" )
  811.  
  812. ;************************
  813. ;**  Copy the keyfile  **
  814. ;************************
  815. (if (exists "Thor_Install:THOR.key" (noreq))
  816. ; Then
  817.     (copyfiles
  818.         (source "Thor_Install:THOR.key")
  819.         (dest "THOR:")
  820.         (nogauge)
  821.     )
  822. )
  823.         
  824. ;*****************************************
  825. ;**  Copy the default arexx macro file  **
  826. ;*****************************************
  827. (if (exists "Thor_Install:THOR.macros" (noreq))
  828. ; Then
  829.     (copyfiles
  830.         (source "Thor_Install:THOR.macros")
  831.         (dest "THOR:")
  832.         (nogauge)
  833.     )
  834. )
  835.  
  836. (default_level)
  837.         
  838. ;***********************************
  839. ; Create the environment variables *
  840. ;***********************************
  841.  
  842. (set Running (run "Thor:bin/basemanager convert"))
  843. (if (<> 0 Running)
  844.     (
  845.         ((set end_text "Basemanager failed in setting up the env-variables.")
  846.         (abort end_text))
  847.     )
  848. )
  849.  
  850. ;******************
  851. ;** Locale stuff **
  852. ;******************
  853.  
  854. (default_level)
  855.  
  856. (set catalog
  857.    (askoptions
  858.       (prompt "What languages would you like to install ?\n"
  859.             "English is the built-in language.")
  860.       (help
  861.             "This will install locale files for other languages than English. "
  862.             "You can set the prefered language on Workbench and in Thor by"
  863.             "using the Sys:Prefs/Locale tool." newline @askchoice-help
  864.       )
  865.       (choices "Norsk" "Dansk" "Svenska" "Deutsch" "Français" "Italiano" "Nederlands" "Català" "Srpski" "Suomi")
  866.       (default 0)
  867.    )
  868. )
  869.  
  870. (makedir "thor:catalogs")
  871.  
  872. (if (bitand 1 catalog)
  873.     (copyfiles
  874.         (source "Thor_Install:catalogs/norsk")
  875.         (dest "thor:catalogs/norsk")
  876.         (all)
  877.     )
  878. )
  879.  
  880. (if (bitand 2 catalog)
  881.     (copyfiles
  882.         (source "Thor_Install:catalogs/dansk")
  883.         (dest "thor:catalogs/dansk")
  884.         (all)
  885.     )
  886. )
  887.  
  888. (if (bitand 4 catalog)
  889.     (copyfiles
  890.         (source "Thor_Install:catalogs/svenska")
  891.         (dest "thor:catalogs/svenska")
  892.         (all)
  893.     )
  894. )
  895.  
  896. (if (bitand 8 catalog)
  897.     (copyfiles
  898.         (source "Thor_Install:catalogs/deutsch")
  899.         (dest "thor:catalogs/deutsch")
  900.         (all)
  901.     )
  902. )
  903.  
  904. (if (bitand 16 catalog)
  905.     (copyfiles
  906.         (source "Thor_Install:catalogs/français")
  907.         (dest "thor:catalogs/français")
  908.         (all)
  909.     )
  910. )
  911.  
  912. (if (bitand 32 catalog)
  913.     (copyfiles
  914.         (source "Thor_Install:catalogs/italiano")
  915.         (dest "thor:catalogs/italiano")
  916.         (all)
  917.     )
  918. )
  919.  
  920. (if (bitand 64 catalog)
  921.     (copyfiles
  922.         (source "Thor_Install:catalogs/nederlands")
  923.         (dest "thor:catalogs/nederlands")
  924.         (all)
  925.     )
  926. )
  927.  
  928. (if (bitand 128 catalog)
  929.     (copyfiles
  930.         (source "Thor_Install:catalogs/català")
  931.         (dest "thor:catalogs/català")
  932.         (all)
  933.     )
  934. )
  935.  
  936. (if (bitand 256 catalog)
  937.     (copyfiles
  938.         (source "Thor_Install:catalogs/srpski")
  939.         (dest "thor:catalogs/srpski")
  940.         (all)
  941.     )
  942. )
  943.  
  944. (if (bitand 512 catalog)
  945.     (copyfiles
  946.         (source "Thor_Install:catalogs/suomi")
  947.         (dest "thor:catalogs/suomi")
  948.         (all)
  949.     )
  950. )
  951.  
  952. ;*********************
  953. ;** reqtools.libary **
  954. ;*********************
  955.  
  956. (copylib
  957.     (prompt "Copying ReqTools library")
  958.     (help "This will copy the ReqTools library." newline @copylib-help)
  959.     (source "Thor_Install:reqtools.library")
  960.     (dest "libs:")
  961.     (confirm)
  962. )
  963.  
  964. ;***********
  965. ;** Fonts **
  966. ;***********
  967.     
  968. (copyfiles
  969.     (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
  970.     (help "This will copy the default font files for Thor." newline @copyfiles-help)
  971.     (source "Thor_Install:Fonts")
  972.     (dest "Fonts:")
  973.     (fonts)
  974.     (choices "Grn" "Thin609" "Thin611" "Thin711")
  975. )
  976.  
  977. ;**************************************
  978. ;* Install the bbsread database stuff *
  979. ;**************************************
  980.  
  981. (set failed (run "thor:bin/initarc"))
  982. (if (<> 0 failed)
  983.     (
  984.         ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.")
  985.         (abort end_text))
  986.     )
  987. )
  988.  
  989. (run "thor:bin/InitCharsets")
  990.  
  991. (expert_level)
  992.  
  993. (set defpath (pathonly @icon))
  994.  
  995. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  996.     ; Then
  997.     (
  998.         (set bbspack 1)
  999.     )
  1000.     ; Else
  1001.     (
  1002.         (if    (askbool
  1003.                 (prompt newline 
  1004.                                 "Would you like to install the modules for "
  1005.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  1006.                                 "to be used with Bulletin Board Systems?\n\n "
  1007.                                 "(you will be able to select which modules to "
  1008.                                 "install later in this installation procedure).")
  1009.                 (help newline
  1010.                                 "This section of the installation is dedicated "
  1011.                                 "to installation of some common formats "
  1012.                                 "required if you want to use THOR with BBSes.\n\n"
  1013.                                 "Select YES if you want to continue with this "
  1014.                                 "installation, otherwise NO")
  1015.                 (default 1)
  1016.             )
  1017.             ; Then 
  1018.             (
  1019.                 (set isthere 20)
  1020.                 (while (= 20 isthere)
  1021.                     (set bbsfile 
  1022.                         (askfile
  1023.                             (prompt (cat "Please select the BBS archive for "#version"\n"
  1024.                                     "(Usually named '"#bbspackname"').\n\n"
  1025.                                     "It will be unarchived automatically."))
  1026.                             (help @askfile-help)
  1027.                             (default (tackon defpath #bbspackname))
  1028.                         )
  1029.                     )
  1030.                     ; verify that the file exists
  1031.                     (if (exists bbsfile)
  1032.                         (
  1033.                             (set isthere 0)
  1034.                             (set defpath (pathonly bbsfile))
  1035.                             (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:"))
  1036.                             (set failed (run runfile))
  1037.                             (if (<> 0 failed)
  1038.                                 (
  1039.                                     ((set failed_text "Unarchiving of the BBS archive failed.")
  1040.                                         (message end_text))
  1041.                                 )
  1042.                                 ; Else
  1043.                                 (
  1044.                                     (set bbspack 1)
  1045.                                 )
  1046.                             )
  1047.                         )
  1048.                         ; else
  1049.                         (
  1050.                             (if    (askbool
  1051.                                           (prompt 
  1052.                                         "File doesn't exist.\n\nDo you want to try again?"
  1053.                                         (default 1)
  1054.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  1055.                                     )
  1056.                                 )
  1057.                                 ; Then
  1058.                                 (
  1059.                                     (set isthere 20)
  1060.                                 )
  1061.                                 ; Else
  1062.                                 (
  1063.                                     (set isthere 0)
  1064.                                 )
  1065.                             )
  1066.                         )
  1067.                     )
  1068.                 )
  1069.             )
  1070.         )
  1071.     )
  1072. )
  1073.  
  1074. (if (exists "Thor_Install:bin/gettcp" (noreq))
  1075.     ; Then
  1076.     (
  1077.         (set inetpack 1)
  1078.     )
  1079.     ; Else
  1080.     (
  1081.         (if    (askbool
  1082.                 (prompt newline 
  1083.                                 "Would you like to install the modules for "
  1084.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  1085.                                 "to be used with Internet?\n\n"
  1086.                                 "(you will be able to select which modules to "
  1087.                                 "install later in this installation procedure).")
  1088.                 (help newline
  1089.                                 "This section of the installation is dedicated "
  1090.                                 "to installation of some common formats "
  1091.                                 "required if you want to use THOR with Internet.\n\n"
  1092.                                 "Select YES if you want to continue with this "
  1093.                                 "installation, otherwise NO")
  1094.                 (default 1)
  1095.             )
  1096.             ; Then 
  1097.             (
  1098.                 (set isthere 20)
  1099.                 (while (= 20 isthere)
  1100.                     (set inetfile 
  1101.                         (askfile
  1102.                             (prompt (cat  
  1103.                                     "Please select the Internet archive for "#version"\n"
  1104.                                     "(Usually named '"#inetpackname"').\n\n"
  1105.                                     "It will be unarchived automatically."))
  1106.                             (help @askfile-help)
  1107.                             (default (tackon defpath #inetpackname))
  1108.                         )
  1109.                     )
  1110.                     ; verify that the file exists
  1111.                     (if (exists inetfile)
  1112.                         (
  1113.                             (set isthere 0)
  1114.                             (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:"))
  1115.                             (set failed (run runfile2))
  1116.                             (if (<> 0 failed)
  1117.                                 (
  1118.                                     ((set failed_text "Unarchiving of the Internet archive failed.")
  1119.                                         (message end_text))
  1120.                                 )
  1121.                                 ; Else
  1122.                                 (
  1123.                                     (set inetpack 1)
  1124.                                 )
  1125.                             )
  1126.                         )
  1127.                         ; else
  1128.                         (
  1129.                             (if    (askbool
  1130.                                           (prompt 
  1131.                                         "File doesn't exist.\n\nDo you want to try again?"
  1132.                                         (default 1)
  1133.                                         (help "YES to select the correct file, or NO to continue without installing this archive.")
  1134.                                     )
  1135.                                 )
  1136.                                 ; Then
  1137.                                 (
  1138.                                     (set isthere 20)
  1139.                                 )
  1140.                                 ; Else
  1141.                                 (
  1142.                                     (set isthere 0)
  1143.                                 )
  1144.                             )
  1145.                         )
  1146.                     )
  1147.                 )
  1148.             )
  1149.         )
  1150.     )
  1151. )
  1152.  
  1153. (if (= bbspack 1)
  1154.     (
  1155.         (set bbs_type
  1156.            (askoptions
  1157.               (prompt
  1158.                         "Please select which BBS modules "
  1159.                         "you want to install.")
  1160.               (help
  1161.                     "What system type for BBS usage that should be "
  1162.                     "installed can be selected here."
  1163.               )
  1164.  
  1165.               (choices
  1166.                     "QWK        - Normal QWK"
  1167.                     "Fido       - Normal Fidonet"
  1168.                     "BlueWave   - Normal BlueWave"
  1169.                     "ABBS       - Normal ABBS"
  1170.                     "ABBS_QWK   - ABBS with QWK support"
  1171.                     "MBBS       - Normal MBBS"
  1172.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  1173.                     "Omen       - Normal Omen"
  1174.               )
  1175.               (default -1)
  1176.            )
  1177.         )
  1178.         (copyfiles
  1179.             (source "Thor_Install:scripts")
  1180.             (dest "THOR:scripts")
  1181.             (pattern "#?BBS#?")
  1182.         )
  1183.         (if (bitand 1 bbs_type)
  1184.             (
  1185.                 (copyfiles
  1186.                     (source "Thor_Install:bin")
  1187.                     (dest "THOR:bin")
  1188.                     (pattern "#?QWK")
  1189.                 )
  1190.                 (copyfiles
  1191.                     (source "Thor_Install:s/cfgqwk")
  1192.                     (dest "THOR:s")
  1193.                 )
  1194.                 (P_executescript "thor:s/cfgqwk")
  1195.             )
  1196.         )
  1197.         (if (bitand 2 bbs_type)
  1198.             (
  1199.                 (copyfiles
  1200.                     (source "Thor_Install:bin")
  1201.                     (dest "THOR:bin")
  1202.                     (pattern "#?FIDO")
  1203.                 )
  1204.                 (copyfiles
  1205.                     (source "Thor_Install:s")
  1206.                     (dest "THOR:s")
  1207.                     (pattern "cfgfido#?")
  1208.                 )
  1209.                 (P_executescript "thor:s/cfgfido")
  1210.                 (P_executescript "thor:s/cfgfido_export")
  1211.             )
  1212.         )
  1213.         (if (bitand 4 bbs_type)
  1214.             (
  1215.                 (copyfiles
  1216.                     (source "Thor_Install:bin")
  1217.                     (dest "THOR:bin")
  1218.                     (pattern "#?BLUE")
  1219.                 )
  1220.                 (copyfiles
  1221.                     (source "Thor_Install:s/cfgblue")
  1222.                     (dest "THOR:s")
  1223.                 )
  1224.                 (P_executescript "thor:s/cfgblue")
  1225.             )
  1226.         )
  1227.         (if (bitand 8 bbs_type)
  1228.             (
  1229.                 (copyfiles
  1230.                     (source "Thor_Install:bin/packambbs")
  1231.                     (dest "THOR:bin")
  1232.                 )
  1233.                 (copyfiles
  1234.                     (source "Thor_Install:bin/parsemsg")
  1235.                     (dest "THOR:bin")
  1236.                 )
  1237.                 (copyfiles
  1238.                     (source "Thor_Install:s/cfgabbs")
  1239.                     (dest "THOR:s")
  1240.                 )
  1241.                 (P_executescript "thor:s/cfgabbs")
  1242.             )
  1243.         )
  1244.         (if (bitand 16 bbs_type)
  1245.             (
  1246.                 (copyfiles
  1247.                     (source "Thor_Install:bin")
  1248.                     (dest "THOR:bin")
  1249.                     (pattern "#?QWK")
  1250.                 )
  1251.                 (copyfiles
  1252.                     (source "Thor_Install:s/cfgabbs_qwk")
  1253.                     (dest "THOR:s")
  1254.                 )
  1255.                 (P_executescript "thor:s/cfgabbs_qwk")
  1256.             )
  1257.         )
  1258.         (if (bitand 32 bbs_type)
  1259.             (
  1260.                 (copyfiles
  1261.                     (source "Thor_Install:bin/packambbs")
  1262.                     (dest "THOR:bin")
  1263.                 )
  1264.                 (copyfiles
  1265.                     (source "Thor_Install:bin/parsemsg")
  1266.                     (dest "THOR:bin")
  1267.                 )
  1268.                 (copyfiles
  1269.                     (source "Thor_Install:s/cfgmbbs")
  1270.                     (dest "THOR:s")
  1271.                 )
  1272.                 (P_executescript "thor:s/cfgmbbs")
  1273.             )
  1274.         )
  1275.         (if (bitand 64 bbs_type)
  1276.             (
  1277.                 (copyfiles
  1278.                     (source "Thor_Install:bin")
  1279.                     (dest "THOR:bin")
  1280.                     (pattern "#?hippo")
  1281.                 )
  1282.                 (copyfiles
  1283.                     (source "Thor_Install:s/cfghippo")
  1284.                     (dest "THOR:s")
  1285.                 )
  1286.                 (copyfiles
  1287.                     (source "Thor_Install:s/cfgbbbs")
  1288.                     (dest "THOR:s")
  1289.                 )
  1290.                 (P_executescript "thor:s/cfghippo")
  1291.                 (P_executescript "thor:s/cfgbbbs")
  1292.             )
  1293.         )
  1294.         (if (bitand 128 bbs_type)
  1295.             (
  1296.                 (copyfiles
  1297.                     (source "Thor_Install:bin")
  1298.                     (dest "THOR:bin")
  1299.                     (pattern "#?omen")
  1300.                 )
  1301.                 (copyfiles
  1302.                     (source "Thor_Install:s/cfgomen")
  1303.                     (dest "THOR:s")
  1304.                 )
  1305.                 (P_executescript "thor:s/cfgomen")
  1306.             )
  1307.         )
  1308.     )
  1309. )
  1310.  
  1311. (if (= inetpack 1)
  1312.     (
  1313.         (set bbs_type
  1314.            (askoptions
  1315.               (prompt
  1316.                         "Please select which Internet modules "
  1317.                         "you want to install.")
  1318.               (help
  1319.                     "What system type for Internet usage that should be "
  1320.                     "installed can be selected here."
  1321.               )
  1322.  
  1323.               (choices
  1324.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  1325.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  1326.                         "UUCP           - Normal UUCP"
  1327.               )
  1328.               (default -1)
  1329.            )
  1330.         )
  1331.  
  1332.         (copyfiles
  1333.             (source "Thor_Install:libs/utnet.library")
  1334.             (dest "THOR:libs")
  1335.         )
  1336.  
  1337.         (copyfiles
  1338.             (source "Thor_Install:bin/InitRFC")
  1339.             (dest "THOR:bin")
  1340.         )
  1341.  
  1342.         (copyfiles
  1343.             (source "Thor_Install:scripts")
  1344.             (dest "THOR:scripts")
  1345.             (pattern "#?UQWK#?")
  1346.         )
  1347.  
  1348.         (if (bitand 1 bbs_type)
  1349.             (
  1350.                 (copyfiles
  1351.                     (source "Thor_Install:bin")
  1352.                     (dest "THOR:bin")
  1353.                     (pattern "#?(UUCP|TCP)")
  1354.                 )
  1355.                 (copyfiles
  1356.                     (source "Thor_Install:")
  1357.                     (dest "THOR:")
  1358.                     (pattern "ConnectTHOR#?")
  1359.                 )
  1360.                 (copyfiles
  1361.                     (source "Thor_Install:s/cfgtcp")
  1362.                     (dest "THOR:s")
  1363.                 )
  1364.                 (copyfiles
  1365.                     (source "Thor_Install:s/cfgtcp_online")
  1366.                     (dest "THOR:s")
  1367.                 )
  1368.                 (P_executescript "thor:s/cfgtcp")
  1369.                 (P_executescript "thor:s/cfgtcp_online")
  1370.                 (set tcptype 1)
  1371.             )
  1372.         )
  1373.         (if (bitand 2 bbs_type)
  1374.             (
  1375.                 (copyfiles
  1376.                     (source "Thor_Install:bin")
  1377.                     (dest "THOR:bin")
  1378.                     (pattern "#?SOUP")
  1379.                 )
  1380.                 (copyfiles
  1381.                     (source "Thor_Install:s")
  1382.                     (dest "THOR:s")
  1383.                     (pattern "#?soup")
  1384.                 )
  1385.                 (makedir "THOR:unix")
  1386.                 (copyfiles
  1387.                     (source "Thor_Install:unix")
  1388.                     (dest "THOR:unix")
  1389.                     (all)
  1390.                 )
  1391.                 (P_executescript "thor:s/cfguqwk_soup")
  1392.                 (P_executescript "thor:s/cfgsoup")
  1393.             )
  1394.         )
  1395.         (if (bitand 4 bbs_type)
  1396.             (
  1397.                 (copyfiles
  1398.                     (source "Thor_Install:bin")
  1399.                     (dest "THOR:bin")
  1400.                     (pattern "#?UUCP")
  1401.                 )
  1402.                 (copyfiles
  1403.                     (source "Thor_Install:s/cfguucp")
  1404.                     (dest "THOR:s")
  1405.                 )
  1406.                 (P_executescript "thor:s/cfguucp")
  1407.                 (set uucptype 1)
  1408.             )
  1409.         )
  1410.     )
  1411. )
  1412.  
  1413. ;****************************************************************************************
  1414. ;****** Copy the arexx scripts + docs that were located in the separate archives ********
  1415. ;****************************************************************************************
  1416.  
  1417. (copyfiles
  1418.     (source "Thor_Install:rexx")
  1419.     (dest "THOR:rexx")
  1420.     (all)
  1421. )
  1422. (copyfiles
  1423.     (source "Thor_Install:docs")
  1424.     (dest "THOR:docs")
  1425.     (all)
  1426. )
  1427.  
  1428. (if    (askbool
  1429.         (prompt newline 
  1430.                         "Would you like to install the optional ARexx "
  1431.                         "scripts for THOR? "
  1432.         (help newline
  1433.                         "This section of the installation is dedicated "
  1434.                         "to installation of some optional ARexx scripts.\n\n "
  1435.                         "Select YES if you want to continue with this "
  1436.                         "installation, otherwise NO"))
  1437.         (default 1)
  1438.     )
  1439.     ; Then 
  1440.     (
  1441.         (set isthere 20)
  1442.         (while (= 20 isthere)
  1443.             (set arexxfile 
  1444.                 (askfile
  1445.                     (prompt (cat  
  1446.                             "Please select the ARexx archive for "#version"\n"
  1447.                             "(Usually named '"#arexxpackname"').\n\n"
  1448.                             "It will be unarchived automatically."))
  1449.                     (help @askfile-help)
  1450.                     (default (tackon defpath #arexxpackname))
  1451.                 )
  1452.             )
  1453.             ; verify that the file exists
  1454.             (if (exists arexxfile)
  1455.                 (
  1456.                     (set isthere 0)
  1457.                     (set defpath (pathonly arexxfile))
  1458.                     (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote arexxfile quote " Thor:rexx/"))
  1459.                     (set failed (run runfile3))
  1460.                     (if (<> 0 failed)
  1461.                         (
  1462.                             ((set failed_text "Unarchiving of the ARexx archive failed.")
  1463.                                 (message end_text))
  1464.                         )
  1465.                     )
  1466.                 )
  1467.                 ; else
  1468.                 (
  1469.                     (if    (askbool
  1470.                                (prompt 
  1471.                                 "File doesn't exist.\n\nDo you want to try again?"
  1472.                                 (default 1)
  1473.                                 (help "YES to select the correct file, or NO to continue without installing this archive.")
  1474.                             )
  1475.                         )
  1476.                         ; Then
  1477.                         (
  1478.                             (set isthere 20)
  1479.                         )
  1480.                         ; Else
  1481.                         (
  1482.                             (set isthere 0)
  1483.                         )
  1484.                     )
  1485.                 )
  1486.             )
  1487.         )
  1488.     )
  1489. )
  1490.  
  1491. (if    (askbool
  1492.         (prompt newline 
  1493.                         "Would you like to install the additional documentation "
  1494.                         "formats for THOR? The available extra formats are "
  1495.                         "PDF (Portable Document Format), Postscript, DVI and HTML."
  1496.         (help newline
  1497.                         "This section of the installation is dedicated "
  1498.                         "to installation of some additional documentation formats.\n\n "
  1499.                         "Select YES if you want to continue with this "
  1500.                         "installation, otherwise NO"))
  1501.         (default 1)
  1502.     )
  1503.     ; Then 
  1504.     (
  1505.         (set isthere 20)
  1506.         (while (= 20 isthere)
  1507.             (set docsfile 
  1508.                 (askfile
  1509.                     (prompt (cat  
  1510.                             "Please select the docs archive for "#version"\n"
  1511.                             "(Usually named '"#docspackname"').\n\n"
  1512.                             "It will be unarchived automatically."))
  1513.                     (help @askfile-help)
  1514.                     (default (tackon defpath #docspackname))
  1515.                 )
  1516.             )
  1517.             ; verify that the file exists
  1518.             (if (exists docsfile)
  1519.                 (
  1520.                     (set isthere 0)
  1521.                     (set defpath (pathonly docsfile))
  1522.                     (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote docsfile quote " Thor:Docs/"))
  1523.                     (set failed (run runfile3))
  1524.                     (if (<> 0 failed)
  1525.                         (
  1526.                             ((set failed_text "Unarchiving of the docs archive failed.")
  1527.                                 (message end_text))
  1528.                         )
  1529.                     )
  1530.                 )
  1531.                 ; else
  1532.                 (
  1533.                     (if    (askbool
  1534.                                (prompt 
  1535.                                 "File doesn't exist.\n\nDo you want to try again?"
  1536.                                 (default 1)
  1537.                                 (help "YES to select the correct file, or NO to continue without installing this archive.")
  1538.                             )
  1539.                         )
  1540.                         ; Then
  1541.                         (
  1542.                             (set isthere 20)
  1543.                         )
  1544.                         ; Else
  1545.                         (
  1546.                             (set isthere 0)
  1547.                         )
  1548.                     )
  1549.                 )
  1550.             )
  1551.         )
  1552.     )
  1553. )
  1554.  
  1555.  
  1556. (install-classact)
  1557.  
  1558. ;*****************************
  1559. ;****** Install icons ********
  1560. ;*****************************
  1561.  
  1562. (set icon
  1563.     (askchoice
  1564.         (prompt
  1565.             "Please select what Workbench icon-set to install with THOR.\n")
  1566.         (help
  1567.             "If you use MagicWB on your Workbench, "
  1568.             "you might want to install the special MagicWB icons.\n\n"
  1569.             "Likewise, if you use NewIcons on your Workbench, "
  1570.             "you might want to install the special NewIcons icons.")
  1571.         (choices "Normal icons" "MagicWB icons" "NewIcons icons")
  1572.         (default 0)
  1573.     )
  1574. )
  1575.  
  1576. (if (= icon 0)
  1577.     (
  1578.         (copyfiles
  1579.             (prompt "Copying Normal icon files...")
  1580.             (source "Thor_Install:NormalIcons")
  1581.             (dest "Thor:")
  1582.             (pattern "~(THOR.guide.info)")
  1583.             (noposition)
  1584.             (nogauge)
  1585.         )
  1586.         (copyfiles
  1587.             (prompt "Copying Normal icon files...")
  1588.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1589.             (dest "Thor:Docs")
  1590.             (newname "THOR.guide.info")
  1591.             (noposition)
  1592.             (nogauge)
  1593.         )
  1594.         (copyfiles
  1595.             (prompt "Copying Normal icon files...")
  1596.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1597.             (dest "Thor:Docs")
  1598.             (newname "ConfigTHOR.guide.info")
  1599.             (noposition)
  1600.             (nogauge)
  1601.         )
  1602.         (copyfiles
  1603.             (prompt "Copying Normal icon files...")
  1604.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1605.             (dest "Thor:Docs")
  1606.             (newname "ARexx.guide.info")
  1607.             (noposition)
  1608.             (nogauge)
  1609.         )
  1610.         (copyfiles
  1611.             (prompt "Copying Normal icon files...")
  1612.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1613.             (dest "Thor:Docs")
  1614.             (newname "BBSReadRexx.guide.info")
  1615.             (noposition)
  1616.             (nogauge)
  1617.         )
  1618.         (copyfiles
  1619.             (prompt "Copying Normal icon files...")
  1620.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1621.             (dest "Thor:Docs")
  1622.             (newname "THOR_Rexx.guide.info")
  1623.             (noposition)
  1624.             (nogauge)
  1625.         )
  1626.         (copyfiles
  1627.             (prompt "Copying Normal icon files...")
  1628.             (source "Thor_Install:NormalIcons/THOR.guide.info")
  1629.             (dest "Thor:Docs")
  1630.             (newname "Installation.guide.info")
  1631.             (noposition)
  1632.             (nogauge)
  1633.         )
  1634.     )
  1635. )
  1636.  
  1637. (if (= icon 1)
  1638.     (
  1639.         (copyfiles
  1640.             (prompt "Copying MagicWB icon files...")
  1641.             (source "Thor_Install:MWBIcons")
  1642.             (dest "Thor:")
  1643.             (pattern "~(THOR.guide.info)")
  1644.             (noposition)
  1645.             (nogauge)
  1646.         )
  1647.         (copyfiles
  1648.             (prompt "Copying MagicWB icon files...")
  1649.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1650.             (dest "Thor:Docs")
  1651.             (newname "THOR.guide.info")
  1652.             (noposition)
  1653.             (nogauge)
  1654.         )
  1655.         (copyfiles
  1656.             (prompt "Copying MagicWB icon files...")
  1657.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1658.             (dest "Thor:Docs")
  1659.             (newname "ConfigTHOR.guide.info")
  1660.             (noposition)
  1661.             (nogauge)
  1662.         )
  1663.         (copyfiles
  1664.             (prompt "Copying MagicWB icon files...")
  1665.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1666.             (dest "Thor:Docs")
  1667.             (newname "ARexx.guide.info")
  1668.             (noposition)
  1669.             (nogauge)
  1670.         )
  1671.         (copyfiles
  1672.             (prompt "Copying MagicWB icon files...")
  1673.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1674.             (dest "Thor:Docs")
  1675.             (newname "BBSReadRexx.guide.info")
  1676.             (noposition)
  1677.             (nogauge)
  1678.         )
  1679.         (copyfiles
  1680.             (prompt "Copying MagicWB icon files...")
  1681.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1682.             (dest "Thor:Docs")
  1683.             (newname "THOR_Rexx.guide.info")
  1684.             (noposition)
  1685.             (nogauge)
  1686.         )
  1687.         (copyfiles
  1688.             (prompt "Copying MagicWB icon files...")
  1689.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  1690.             (dest "Thor:Docs")
  1691.             (newname "Installation.guide.info")
  1692.             (noposition)
  1693.             (nogauge)
  1694.         )
  1695.     )
  1696. )
  1697. (if (= icon 2)
  1698.     (
  1699.         (copyfiles
  1700.             (prompt "Copying NewIcons icon files...")
  1701.             (source "Thor_Install:NewIcons")
  1702.             (dest "Thor:")
  1703.             (pattern "~(THOR.guide.info)")
  1704.             (noposition)
  1705.             (nogauge)
  1706.         )
  1707.         (copyfiles
  1708.             (prompt "Copying NewIcons icon files...")
  1709.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1710.             (dest "Thor:Docs")
  1711.             (newname "THOR.guide.info")
  1712.             (noposition)
  1713.             (nogauge)
  1714.         )
  1715.         (copyfiles
  1716.             (prompt "Copying NewIcons icon files...")
  1717.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1718.             (dest "Thor:Docs")
  1719.             (newname "ConfigTHOR.guide.info")
  1720.             (noposition)
  1721.             (nogauge)
  1722.         )
  1723.         (copyfiles
  1724.             (prompt "Copying NewIcons icon files...")
  1725.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1726.             (dest "Thor:Docs")
  1727.             (newname "ARexx.guide.info")
  1728.             (noposition)
  1729.             (nogauge)
  1730.         )
  1731.         (copyfiles
  1732.             (prompt "Copying NewIcons icon files...")
  1733.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1734.             (dest "Thor:Docs")
  1735.             (newname "BBSReadRexx.guide.info")
  1736.             (noposition)
  1737.             (nogauge)
  1738.         )
  1739.         (copyfiles
  1740.             (prompt "Copying NewIcons icon files...")
  1741.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1742.             (dest "Thor:Docs")
  1743.             (newname "THOR_Rexx.guide.info")
  1744.             (noposition)
  1745.             (nogauge)
  1746.         )
  1747.         (copyfiles
  1748.             (prompt "Copying NewIcons icon files...")
  1749.             (source "Thor_Install:NewIcons/THOR.guide.info")
  1750.             (dest "Thor:Docs")
  1751.             (newname "Installation.guide.info")
  1752.             (noposition)
  1753.             (nogauge)
  1754.         )
  1755.     )
  1756. )
  1757.  
  1758. (if (not (exists "Thor:Filetypes" (noreq)))
  1759.     (P_install-filetypes)
  1760. )
  1761. ;*****************************
  1762. ;* Simple configuration here *
  1763. ;*****************************
  1764.  
  1765. (if (= tcptype 1)
  1766.     ; then
  1767.     (
  1768.         (if    (askbool
  1769.                 (prompt newline "The following section in this installation "
  1770.                         "is used for setting up parameters needed "
  1771.                         "for use of the TCP types (POP3/NNTP/SMTP) "
  1772.                         "for Internet mail and news. This configuration is optional "
  1773.                         "but must be set later if you do not do this now.\n\n"
  1774.                         "Do you want to proceed with this?")
  1775.                 (help #installtext)
  1776.                 (default 1)
  1777.             )
  1778.             ; Then 
  1779.             (
  1780.                 (set DL_Dir 
  1781.                         (askdir
  1782.                             (prompt
  1783.                                 "Select default download directory."
  1784.                                 "This directory will be used for BBS message packets and "
  1785.                                 "downloads, SMTPd mailboxes and saving of MIME/uuencoded "
  1786.                                 "binaries. It can be changed in ConfigTHOR later on."
  1787.                             (help @askdir-help)
  1788.                             (default "Work:")
  1789.                             (newpath)
  1790.                         )
  1791.                     )
  1792.                 )
  1793.                 (set_dl_dir)
  1794.                 (create_inet_system)
  1795.                 (if    (askbool
  1796.                         (prompt newline 
  1797.                                 "If you like to set up some parameters like your "
  1798.                                 "real name, newsserver, mailserver etc. you can "
  1799.                                 "do this now. "
  1800.                                 "Do you want to proceed with this?")
  1801.                         (help #installtext)
  1802.                            (default 1)
  1803.                     )
  1804.                     ; Then 
  1805.                     (
  1806.                         (set typecfg (cat typecfg "THOR:bin/cfgtcp " quote systemname quote))
  1807.                         (set running (run typecfg))
  1808.                         (if    (askbool
  1809.                                 (prompt newline 
  1810.                                         "Would you like to order a list of available newsgroups "
  1811.                                         "from the configured newsserver for the next time you "
  1812.                                         "connect?")
  1813.                                 (help #installtext)
  1814.                                    (default 1)
  1815.                             )
  1816.                             ; Then 
  1817.                             (
  1818.                                 (set ConfigConf (cat '\nCONFIGCONF BBSNAME ' tick '"' systemname '"' tick ' CONFNAME ' tick '"EMail"' tick))
  1819.                                 (set ConfList (cat 'WRITEBREVENT BBSNAME ' tick '"' systemname '"' tick ' EVENT EVE_CONFLIST\n'))
  1820.                                 (set adrcmd (cat 'address command 'quote'Thor:bin/LoadBBSRead'quote'\n'))
  1821.                                 (textfile
  1822.                                     (dest 't:getconflist.rexx')
  1823.                                     (append '/* Order a list of newsgroups */\n\n')
  1824.                                     (append adrcmd)
  1825.                                     (append 'WaitForPort BBSREAD\n')
  1826.                                     (append 'address BBSREAD\n')
  1827.                                     (append '\nEVE_CONFLIST = 6\n')
  1828.                                     (append ConfList)
  1829.                                     (append '\nGCF_IGNORE_KEEPMSG   = "00000001"x')
  1830.                                     (append '\nGCF_IGNORE_KEEPTIME  = "00000002"x')
  1831.                                     (append '\nGCF_ALWAYS_REPLY_STR = "00000100"x')
  1832.                                     (append '\nBDF_MARK_OWN_MSGS    = "00000080"x')
  1833.                                     (append '\nCDF_MEMBER_OF        = "00000001"x')
  1834.                                     (append '\nCDF_MAIL             = "00000002"x')
  1835.                                     (append '\nCDF_BBS_KEEPMSG      = "00000200"x')
  1836.                                     (append '\nCDF_BBS_KEEPTIME     = "00000400"x')
  1837.                                     (append '\nCDF_IGNORE_KEEPMSG   = "00000800"x')
  1838.                                     (append '\nCDF_IGNORE_KEEPTIME  = "00001000"x')
  1839.                                     (append '\nCDF_MARK_OWN_MSGS    = "00400000"x')
  1840.                                     (append '\nCDF_ALWAYS_REPLY_STR = "02000000"x')
  1841.                                     (append (cat ConfigConf ' REPLYSTRING ' tick '"Hello %N, on %D, you said,"' tick ' SET c2x(CDF_MARK_OWN_MSGS)'))
  1842.                                     (append (cat ConfigConf ' SET c2x(CDF_ALWAYS_REPLY_STR)'))
  1843.                                     (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPTIME)'))
  1844.                                     (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPMSG)'))
  1845.                                     (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPTIME)'))
  1846.                                     (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPMSG)'))
  1847.                                     (append (cat ConfigConf ' SET c2x(CDF_MEMBER_OF)'))
  1848.                                     (append (cat ConfigConf ' SET c2x(CDF_MAIL)'))
  1849.                                     (append '\n')
  1850.                                 )
  1851.                                 (if (<> 0 (run 'rx t:getconflist.rexx'))
  1852.                                     (run 'sys:rexxc/rx t:getconflist.rexx')
  1853.                                 )
  1854.                             )
  1855.                         )
  1856.                         (message #endtcpcfgtext)
  1857.                     )
  1858.                 )
  1859.             )
  1860.         )
  1861.     )
  1862.     ; else
  1863.     (
  1864.         (if    (askbool
  1865.                 (prompt newline "The following section in this installation "
  1866.                             "is used for setting up a download and an upload "
  1867.                             "directory for message packets.  This section is "
  1868.                             "optional, but the directories needs to be "
  1869.                             "set in THOR if you do not set them up here.\n\n"
  1870.                             "Do you want to proceed with this?")
  1871.                 (help #installtext)
  1872.                 (default 1)
  1873.             )
  1874.             ; Then 
  1875.             (
  1876.                 (set DL_Dir 
  1877.                     (askdir
  1878.                         (prompt "Where do you keep your downloaded message packets?\n\n"
  1879.                                 "This is usually the download directory "
  1880.                                 "configured in the communication program you "
  1881.                                 "use."
  1882.                             (help @askdir-help)
  1883.                             (default "Work:")
  1884.                             (newpath)
  1885.                         )
  1886.                     )
  1887.                 )
  1888.                 (set_dl_dir)
  1889.     
  1890.                 (set UL_Dir 
  1891.                     (askdir
  1892.                         (prompt "Where would you like to keep any reply "
  1893.                                 "message packets that THOR generates?\n\n"
  1894.                                 "This is usually the upload directory "
  1895.                                 "configured in your communication program."
  1896.                             (help @askdir-help)
  1897.                             (default "Work:")
  1898.                             (newpath)
  1899.                         )
  1900.                     )
  1901.                 )
  1902.                 (set_ul_dir)
  1903.             )
  1904.         )
  1905.     )
  1906. )
  1907.  
  1908. ;*****************************
  1909. ;***** WE ARE ALMOST DONE ****
  1910. ;*****************************
  1911.  
  1912. (if (> (exists ("sys:Utilities/more")) 0) (set #mcmd  "sys:Utilities/more") )
  1913. (if (> (exists ("c:multiview")) 0) (set #mcmd "c:multiview") )
  1914. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mcmd  "sys:Utilities/multiview") )
  1915.  
  1916. (run (cat "run " #mcmd " THOR.readme") )
  1917.  
  1918. ; make sure that default-dir is pointing to the right place
  1919. (set @default-dest Thor_Dir)
  1920.     
  1921. (makeassign "Thor_Install")
  1922. (makeassign "BBSData")
  1923. (makeassign "Thor_Disk" (safe))
  1924.  
  1925. (if (= dldirproblem 1)
  1926.     (message (cat "There was a problem configuring the download directory.\n\n"
  1927.         "Please configure this manually in THOR."))
  1928. )
  1929.  
  1930. ; now for the exit
  1931. (exit #endtext)
  1932.  
  1933.